extends "../cTDW_3/cTDW_3.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "狂战士"
	lv = 3
	attCoe.atkRan = 1
	attCoe.atk = 36 / 8.5 * 2 / 3
	attCoe.maxHp = 800 / 112.5 / 3

	addCdSkill("kzs",10)
	addSkillTxt("嗜血狂怒：物强+25%，吸血+20%，攻速+150%，持续5秒[cd：10秒，不可叠加效果]")
	addSkillTxt("血脉激发：50%概率使<嗜血狂怒>持续时间增加50%并免疫负面状态[之前已添加不免疫]")

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "kzs":
		cst("嗜血狂怒","000000",position)
		var times = 5
		if sys.rndPer(50):
			times *= 1.5
			addBuff(BF1.new(times))
		addBuff(BF.new(times))

class BF:
	extends Buff
	func _init(lv):
		attInit()
		life = lv * 1.0
		att.suck = 0.2
		att.spd = 1.5
		att.atkL = 0.25

class BF1:
	extends Buff
	var canremove:bool = false
	func _init(lv):
		attInit()
		life = lv * 1.0

	func _connect():
		masCha.connect("onAddBuff",self,"run")

	func run(buff):
		if buff.get("canremove") != false && buff.isNegetive && buff.id != "":
			buff.isDel = true